Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSF: Warn when there are no exported stories #10357

Merged
merged 2 commits into from
Apr 9, 2020

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Apr 9, 2020

Issue: #10326 is an example that could benefit from this.

What I did

Warning message when there are story files but no exported stories:
image

How to test

Have a story file which does not contain a named export and run storybook:

// button.stories.js
import Button from "./button";

export default { 
    title: 'Button',
    component: Button
};

@shilman shilman changed the title feat(csf): warn when there are no exported stories CSF: Warn when there are no exported stories Apr 9, 2020
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great & love the tests. Small suggestion on the code 🙏

@shilman shilman added this to the 6.0 milestone Apr 9, 2020
@shilman shilman merged commit 7c20b3b into next Apr 9, 2020
@shilman shilman deleted the feat/warn-with-no-exported-stories branch April 9, 2020 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants